package dao;

import com.lagou.RunBoot;
import com.lagou.entity.COrder;
import com.lagou.repository.COrderRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.Date;

@RunWith(SpringRunner.class)
@SpringBootTest(classes= RunBoot.class)
public class test_base {

    @Resource
    private COrderRepository cOrderRepository;

    @Test
    public void testAdd(){
        for (int i=0;i<10;i++){
            COrder cOrder = new COrder();
            //cOrder.setId(i);
            cOrder.setDel(false);
            cOrder.setUserId(i+1);
            cOrder.setCompanyId(i+2);
            cOrder.setPublishUserId(i+3);
            cOrder.setPositionId(1);
            cOrder.setResumeType(0);
            cOrder.setStatus("1");
            cOrder.setCreateTime(new Date());
            cOrder.setUpdateTime(new Date());
            cOrderRepository.save(cOrder);
        }

    }
}
